
package com.bstek.urule.builder.resource;

import com.bstek.urule.model.library.action.ActionLibrary;
import com.bstek.urule.parse.deserializer.ActionLibraryDeserializer;
import org.dom4j.Element;


/**
 * @author Jacky.gao
 * @since 2014年11月22日
 */
public class ActionLibraryResourceBuilder implements ResourceBuilder<ActionLibrary> {
    private ActionLibraryDeserializer actionLibraryDeserializer;

    public ActionLibrary build(Element root) {
        return actionLibraryDeserializer.deserialize(root);
    }

    public void setActionLibraryDeserializer(ActionLibraryDeserializer actionLibraryDeserializer) {
        this.actionLibraryDeserializer = actionLibraryDeserializer;
    }

    public boolean support(Element root) {
        return actionLibraryDeserializer.support(root);
    }

    public ResourceType getType() {
        return ResourceType.ActionLibrary;
    }
}
